-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update list.php #30254
Update list.php #30254
Conversation
Added condition to include client code in the search when the global variable SOCIETE_ADD_REF_IN_LIST is set to 1. - Modified the SQL query to include 's.code_client' in the search conditions. - Added check for the global variable SOCIETE_ADD_REF_IN_LIST. - If SOCIETE_ADD_REF_IN_LIST is 1, 's.code_client' is included in the search along with 's.nom' and 's.name_alias'. - Ensured that 's.code_client' is searched separately only when SOCIETE_ADD_REF_IN_LIST is 1 and 'search_societe' is not defined.
htdocs/comm/propal/list.php
Outdated
@@ -635,16 +635,29 @@ | |||
if ($search_availability) { | |||
$sql .= " AND p.fk_availability IN (".$db->sanitize($db->escape($search_availability)).')'; | |||
} | |||
$societe_add_ref_in_list = (!empty($conf->global->SOCIETE_ADD_REF_IN_LIST) ? $conf->global->SOCIETE_ADD_REF_IN_LIST : 0); // Récupérer la valeur de SOCIETE_ADD_REF_IN_LIST |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you replace conf->global->xxx with getDolGlobalString('xxx
Old syntax is no more allowed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's ok now
Refactor: Replace conf->global->SOCIETE_ADD_REF_IN_LIST with getDolGlobalString('SOCIETE_ADD_REF_IN_LIST')
htdocs/comm/propal/list.php
Outdated
@@ -635,16 +635,29 @@ | |||
if ($search_availability) { | |||
$sql .= " AND p.fk_availability IN (".$db->sanitize($db->escape($search_availability)).')'; | |||
} | |||
$societe_add_ref_in_list = (!empty(getDolGlobalString('SOCIETE_ADD_REF_IN_LIST')) ? getDolGlobalString('SOCIETE_ADD_REF_IN_LIST') : 0); // Récupérer la valeur de SOCIETE_ADD_REF_IN_LIST |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$societe_add_ref_in_list = getDolGlobalInt('SOCIETE_ADD_REF_IN_LIST');
is more simple and pass the tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's ok now
Simplified SOCIETE_ADD_REF_IN_LIST retrieval Replaced conditional retrieval with getDolGlobalInt('SOCIETE_ADD_REF_IN_LIST') to simplify code and pass tests.
Added condition to include client code in the search when the global variable SOCIETE_ADD_REF_IN_LIST is set to 1.
Instructions
This is a template to help you make good pull requests. You may use Github Markdown syntax to format your issue report.
Please:
FIX|Fix #[issue_number Short description]
[Long description]
CLOSE|Close #[issue_number Short description]
[Long description]
NEW|New [Short description]
[Long description]
PERF|Perf #[issue_number Short description]
[Long description]
QUAL|Qual #[issue_number Short description]
[Long description]